# -*- mode: python -*-
# vi: set ft=python :

# Copyright 2020 Massachusetts Institute of Technology.
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.

load("//htmlbook/tools/jupyter:defs.bzl", "rt_ipynb_test")
load("//htmlbook/tools/tidy:def.bzl", "html_tidy_test")

exports_files(
    ["LICENSE.TXT"],
    visibility = ["//visibility:public"],
)

exports_files(
    ["setup.cfg"],
    visibility = ["//:__subpackages__"],
)

filegroup(
    name = "html",
    srcs = glob([
        "*.html",
        "*.html.in",
    ]),
    visibility = ["//:__subpackages__"],
)

html_tidy_test(
    name = "html_tidy",
    srcs = [":html"],
    config = ".tidy.config",
)

rt_ipynb_test(
    name = "intro",
    srcs = ["intro.ipynb"],
)

rt_ipynb_test(
    name = "robot",
    srcs = ["robot.ipynb"],
)

rt_ipynb_test(
    name = "pick",
    srcs = ["pick.ipynb"],
)

rt_ipynb_test(
    name = "pose",
    data = ["//manipulation/models:models"],
    srcs = ["pose.ipynb"],
    deps = ["//manipulation"],
    tags = ["no-sandbox"],  # from vtk-test-tags() in drake
)

rt_ipynb_test(
    name = "clutter",
    srcs = ["clutter.ipynb"],
    data = ["//manipulation/models:models"],
    tags = ["no-sandbox"],  # from vtk-test-tags() in drake
    deps = [
        "//manipulation",
        "//manipulation:mustard_depth_camera_example",
    ],
)

rt_ipynb_test(
    name = "force",
    srcs = ["force.ipynb"],
    data = ["//manipulation/models:models"],
    deps = [
        "//manipulation",
    ],
)

rt_ipynb_test(
    name = "trajectories",
    srcs = ["trajectories.ipynb"],
    data = ["//manipulation/models:models"],
    deps = [
        "//manipulation",
    ],
)

rt_ipynb_test(
    name = "manipulation_station",
    srcs = ["manipulation_station.ipynb"],
    data = ["//manipulation/models:models"],
    deps = [
        "//manipulation",
    ],
)

filegroup(
    name = "chapters",
    srcs = ["chapters.json"],
    visibility = ["//visibility:public"],
)
